package controllers

type MainController struct {
	baseController
}

func (view *MainController) Get() {
	view.Data["title"] = "go chat"
	view.TplName = "home/index.tpl"
}

func (view *MainController) Test() {

	json := make(map[string]interface{})
	json["haha"] = "test"
	json["lala"] = 2
	list := make(map[string]string)
	list["a"] = "asd"
	list["b"] = "qwe"
	json["list"] = list

	number := make([]interface{}, 5)
	number[0] = 2
	number[1] = "qwe"
	number[2] = true
	json["number"] = number

	view.Data["json"] = json

	view.ServeJSON()
}
